package cn.rui.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 公告通知
 * @author 徽州大都督
 * @date 2021/6/11
 */
@ApiModel(description = "通知类",value = "通知类")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_notice")
public class Notice implements Serializable {

    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 创建人ID
     */
    private Integer userId;

    /**
     * 创建人实体
     */
    @TableField(exist = false)
    private User user;

    /**
     * 通知标题
     */
    private String title;

    /**
     * 通知内容
     */
    private String content;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    @TableLogic
    private Integer delFlag;
}
